import { Node, SpriteAtlas } from 'cc'
export class ConfigSelectItemData {
  public key: string
  public type: number
  public sizeMap: string
  public icon: string
  public nodeScale: number
  public posI: number
  public bagNode: Node
  public atals: SpriteAtlas

  public loadJson(json: any) {
    this.key = json.key.toString()
    this.type = Number(json.type)
    this.sizeMap = json.sizeMap
    this.icon = json.spriteFram.toString()
    this.nodeScale = Number(json.nodeScale ? json.nodeScale : 1)
  }
  public setOtherData(posI: number, atals: SpriteAtlas, bagNode: Node) {
    this.posI = posI
    this.atals = atals
    this.bagNode = bagNode
  }
}
